/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package ua.yandex.skipass;

/**
 *
 * @author vlad
 */
public enum UsesCount {

    COUNT_10(10,
            PassType.WEEKDAY,
            PassType.WEEKEND),
    COUNT_20(20,
            PassType.WEEKDAY,
            PassType.WEEKEND),
    COUNT_50(50,
            PassType.WEEKDAY,
            PassType.WEEKEND),
    COUNT_100(100,
            PassType.WEEKDAY,
            PassType.WEEKEND);

    private final PassType[] supportedTypes;
    private final int count;
    
    UsesCount(int count, PassType... supportedTypes) {
        this.count = count;
        this.supportedTypes = supportedTypes;
    }
    
    public PassType[] supported() {
        PassType[] result
                = new PassType[supportedTypes.length];
        System.arraycopy(supportedTypes, 0, result, 0, supportedTypes.length);
        return result;
    }
    
    public int count() {
        return count;
    }
}
